<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>地图 - geojson</title>
    <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
</head>
<body>
<div id="container"></div>


<script src="http://cache.amap.com/lbs/static/es5.min.js"></script>
<script src="http://webapi.amap.com/maps?v=1.3&key=b47a8a32ba9322448a427cf1f02a59f1"></script>
<script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script>
    var map = new AMap.Map('container', {
        resizeEnable: true,
        zoom:11,
        center: [116.397428, 39.90923]
    });

    //jQuery中读取json文件
    $.getJSON("../js/china.json",function(data){
        $.each(data.features,function(){
                var name = this.properties.name;
                var cp = this.properties.cp;
                var marker = new AMap.Marker({
                    position: cp,
                    map: map
                });
            }
        );
    });
</script>
</body>
</html>